﻿<?php
require('config.php');
?>
<!doctype html>
 
<html lang="<?php echo strtolower($_SESSION['country']); ?>">
<head>
  <meta charset="utf-8" />
  <title>Taxík Online</title>
  <link rel="stylesheet" href="/lib/css/smoothness/jquery-ui-1.10.3.custom.css" />
  <script src="/lib/js/jquery-1.9.1.js"></script>
  <script src="/lib/js/jquery-ui-1.10.3.custom.js"></script>
  <script src="/lib/js/functions.js"></script>
  <link rel="stylesheet" href="/lib/css/style.css" />
</head>
<body>

<div id="objednavka">
<form name="order" name="Objednávka" action="order.php" enctype="text/plain" method="post">
	<label for="city">mesto:</label>
	<select name="city" onChange="getDriversCount(this.options[this.selectedIndex].value)">
	<?php
	$p = $DB->fetch_all_array("SELECT id,name FROM taxi__city WHERE country='".$_SESSION['country']."' ORDER BY name ASC");
	if(!empty($p)) {
		foreach ($p as $k => $v) {
			echo "<option value='".$v['id']."'>".$v['name']."</option>";
		}
	}
	?>
	</select><div id="driverscount"></div><br />
	<input type="text" name="from" size="45" placeholder="Odkiaľ / Vaša adresa" required/><br />
	<input type="text" name="to" size="45" placeholder="Kam / Cieľ cesty" required/><br />
	<label for="yourname">Vaše meno:</label> <input type="tel" name="yourname" size="30" required/><br />
	<label for="phone">telefón:</label> <input type="tel" name="phone" size="13" maxlength="20" required/>&nbsp;&nbsp;<label for="arrival">čas:</label> <input type="time" name="arrival" value="<?php echo date('H:i:00'); ?>"/><br />
	<label for="note">poznámka:</label><input type="text" name="note" size="25"/>
	<input type="submit" value="Vyhľadať"/>
</form>
</div>

</body>
</html>